static char sPragmas[]=
"PRAGMA synchronous=0;\n"
"PRAGMA count_changed=0;\n"
"PRAGMA cache_size=5000;\n"
"PRAGMA auto_vacuum=0;\n"
"PRAGMA temp_store=MEMORY;\n"
"PRAGMA legacy_file_format=OFF;\n"
"PRAGMA encoding=\"UTF-8\";";

static char sCreateDataTables[]=
"CREATE TABLE Calendars\n"
"(\n"
"	ID				INTEGER PRIMARY KEY NOT NULL,\n"
"	Name			TEXT NOT NULL,\n"
"	Type			INTEGER NOT NULL,\n"
"	URL				TEXT,\n"
"	Color			NUMERIC NOT NULL\n"
");\n"
"\n"
"CREATE TABLE Events\n"
"(\n"
"	UID				TEXT PRIMARY KEY NOT NULL,\n"
"	Calendar		INTEGER NOT NULL,\n"
"	Type			INTEGER NOT NULL,\n"
"	Data			TEXT NOT NULL,\n"
"	Start			NUMERIC NOT NULL,\n"
"	End				NUMERIC NOT NULL\n"
");\n"
"\n"
"CREATE INDEX EventStartIndex ON Events(Start);\n"
"CREATE INDEX EventEndIndex ON Events(End);\n"
"CREATE INDEX EventCalendarIndex ON Events(Calendar);\n"
"\n";

static char sInsertCalendar[]=
"INSERT INTO Calendars(Name,Type,URL,Color) VALUES(?,?,?,?)";

static char sInsertEvent[]=
"INSERT INTO Events(UID,Calendar,Type,Data,Start,End) VALUES(?,?,?,?,?,?)";

static char sGetEventsBetween[]=
"SELECT * FROM Events WHERE Start<? AND End>? AND Calendar=?";

static char sGetCalendars[]=
"SELECT ID,Type FROM Calendars";

static char sGetCalendar[]=
"SELECT * FROM Calendars WHERE ID=?";
